package com.shuyun.springboot.amqp;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * Created by feng.ding on 2017/2/6.
 */
@SpringBootApplication
public class Demo {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(Demo.class, args);
        Sender sender = context.getBean("sender", Sender.class);
        sender.sendMsg("测试Spring AMQP发送消息");
        try {
            Thread.sleep(1000);
        }catch (InterruptedException e) {
            e.printStackTrace();
        }
        context.close();
    }
}
